home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1998 #1 / Amiga Plus 1998 #1.iso / demo-versionen / haage&partner / warpup-warpos / source / tools / stackppc.p < prev   
Text File  |  1997-09-24  |  2KB  |  65 lines

  1.                 incdir  include:
  2.                 incdir  lvo:
  3.  
  4. **      '(C) Copyright 1997 Haage & Partner Computer GmbH'
  5. **           All Rights Reserved
  6.  
  7.                 include powerpc/ppcmacros.i
  8.                 include powerpc/powerpc.i
  9.                 include powerpc/tasksppc.i
  10.  
  11.                 include powerpc_lib.i
  12.                 include exec_lib.i
  13.                 include dos_lib.i
  14.  
  15.                 xref    _SysBase
  16.                 xref    _DOSBase
  17.                 xref    _PowerPCBase
  18.                 xref    _LinkerDB
  19.                 smalldata
  20.                 executable
  21.                 escapestr
  22.                 version 10
  23.  
  24. start
  25.                 prolog  1024
  26.                 push    r31
  27.                 la      _d1,template
  28.                 la      _d2,Array
  29.                 li      _d3,0
  30.                 RUN68K_XL       _DOSBase,ReadArgs
  31.                 tstw    _d0
  32.                 beq     .close
  33.                 mr      r31,_d0
  34.                 lw      r3,Array
  35.                 tstw    r3
  36.                 beq     .show
  37.                 lwz     r4,0(r3)
  38.                 CALLPOWERPC     ChangeStack
  39.                 b       .done
  40. .show
  41.                 li      r4,0
  42.                 CALLPOWERPC     FindTaskPPC
  43.                 lwz     r3,TASKPPC_STACKSIZE(r3)
  44.                 sw      r3,Args
  45.                 la      _d1,showsize
  46.                 la      _d2,Args
  47.                 RUN68K_XL       _DOSBase,VPrintf
  48. .done
  49.                 mr      _d1,r31
  50.                 RUN68K_XL       _DOSBase,FreeArgs
  51. .close
  52.                 pop     r31
  53.                 epilog
  54.  
  55.                 section data
  56. template        dc.b    "SIZE/N",0
  57. showsize        dc.b    "The current PPC stack size is: %ld bytes\n",0
  58.  
  59.                 section bss
  60.                 ds.b    32
  61. Array           ds.l    1
  62. Args            ds.l    1
  63.                 ds.b    32
  64.                 even
  65.